using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Collections;
using System.Runtime.Remoting;

namespace MULENetworking
{
    public interface IChatRoom
    {
        /*Chat.cs = Chat Information
		List of game names (if we have multiple at a time?)
		List of chat members/nicknames (have a unique index ID number)
		String for chat dialog
		Method: StartGame*/

        /// <summary>
        /// Keeps an entry for each message sent to the server for chat.
        /// </summary>
        ArrayList chatList
        {
            get;
            set;
        }

        /// <summary>
        /// Adds messages to the messageLog ArrayList so that users can all have the same messages.
        /// </summary>
        string lastMessage
        {
            get;
            set;
        }

        /// <summary>
        /// Will hold onto our list of unique users, and keep their user ID's available as index numbers.
        /// </summary>
        ArrayList chatMembers
        {
            get;
            set;
        }

        /// <summary>
        /// Attempts to add the specified user name to the chat room.
        /// </summary>
        /// <param name="desiredName">The name that the user input into his client to use as his player name.</param>
        /// <returns>A player object that contains a unique player ID number if the player was added. Otherwise, returns null (or a negative player ID number).</returns>
        IPlayer AddUser(string desiredName);

        /// <summary>
        /// Attempts to initiate a game with 4 valid players. We can have this execute after specifics for the game are picked, or have this bring the users to that option window where they click ready immediately before the game starts.
        /// </summary>
        /// <param name="player1">Player 1 of the Game</param>
        /// <param name="player2">Player 2 of the Game</param>
        /// <param name="player3">Player 3 of the Game</param>
        /// <param name="player4">Player 4 of the Game</param>
        /// <returns>IGameTasks if success to allow transfers, auctions, and turns; null if fail</returns>
        IGameTasks StartGame(IPlayer player1, IPlayer player2, IPlayer player3, IPlayer player4);
        //TODO: we will probably want to return some sort of Game object in the future

    }
    
    
    /*public interface IChatRoom
    {
        void ConnectToChat(IChatClient clientObj);
        void SendMessage(IChatClient clientObj);
        void RemoveMe(IChatClient clientObj);
        string AmIConnected();


        /// <summary>
        /// Attempts to create a user with the specified name.
        /// </summary>
        /// <param name="desiredName">The name that the user input into his client to use as his player name.</param>
        /// <returns>A player object that contains a unique player ID number if the player was added. Otherwise, returns null (or a negative player ID number).</returns>
        IPlayer CreatePlayer(string desiredName);

        /// <summary>
        /// Attempts to initiate a game with 4 valid players. We can have this execute after specifics for the game are picked, or have this bring the users to that option window where they click ready immediately before the game starts.
        /// </summary>
        /// <param name="player1">Player 1 of the Game</param>
        /// <param name="player2">Player 2 of the Game</param>
        /// <param name="player3">Player 3 of the Game</param>
        /// <param name="player4">Player 4 of the Game</param>
        /// <returns>IGameTasks if success to allow transfers, auctions, and turns; null if fail</returns>
        IGameTasks StartGame(IPlayer player1, IPlayer player2, IPlayer player3, IPlayer player4);
        //TODO: we will probably want to return some sort of Game object in the future
    }

    public interface IChatClient
    {
        /// <summary>
        /// Keeps an entry for each message sent to the server for chat.
        /// </summary>
        ArrayList ChatList
        {
            get;
            set;
        }
        
        /// <summary>
        /// Will hold onto our list of unique users, and keep their user ID's available as index numbers.
        /// </summary>
        ArrayList ChatMembers
        {
            get;
            set;
        }

        string UserName
        {
            get;
            set;
        }

        string Message
        {
            get;
            set;
        }

        void SendMessageToMe(IChatClient clientObj);
        void SendAWelcomeToMe(IChatClient clientObj);
        void ClientLeft(IChatClient clientObj);
    }

    public abstract class EventsManager : MarshalByRefObject, IChatClient
    {
        public abstract ArrayList ChatList
        {
            get;
            set;
        }

        public abstract ArrayList ChatMembers
        {
            get;
            set;
        }

        public abstract string UserName
        {
            get;
            set;
        }

        public abstract string Message
        {
            get;
            set;
        }

        public abstract void SendMessageToMe(IChatClient clientObj);
        public abstract void SendAWelcomeToMe(IChatClient clientObj);
        public abstract void ClientLeft(IChatClient clientObj);
    }*/
}
